// src/store/modules/user.js
export default {
  namespaced: true,
  state: {
    id: 0,
    name: '',
    userCode: ''  // 添加userCode字段
  },
  mutations: {
    updateId (state, id) {
      state.id = id
    },
    updateName (state, name) {
      state.name = name
    },
    updateCode (state, userCode) {  // 添加updateCode mutation
      state.userCode = userCode
    }
  }
}
